package com.ymatou.cs.api.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.cs.api.service.ReturnReasonListCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P3;
import com.ymttest.utils.constant.ECode;

/**
 * 获取退货理由列表数据 FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_ReturnReasonList {
	private static ReturnReasonListCall rc;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("获取退货理由列表数据接口");
	}

	@Before
	public void caseUp() {
		rc = new ReturnReasonListCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(rc.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_ReturnReasonList_001() {
		Logger.start(true,"获取退货理由列表数据成功");
		try {
			rc.callService();
			Logger.comment("ReturnReasonListCall send:" + rc.getEntityString());
			Logger.comment("ReturnReasonListCall return:" + rc.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, rc.getCode(), "验证Code");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}